package com.iflytek.jobs.service.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.iflytek.jobs.service.mapper.TraineeJobMapper;
import com.iflytek.jobs.service.domain.TraineeJob;
import com.iflytek.jobs.service.service.ITraineeJobService;

/**
 * 实习岗位跟踪Service业务层处理
 * 
 * @author chenhs
 * @date 2024-01-17
 */
@Service
public class TraineeJobServiceImpl implements ITraineeJobService 
{
    @Autowired
    private TraineeJobMapper traineeJobMapper;

    /**
     * 查询实习岗位跟踪
     * 
     * @param trId 实习岗位跟踪主键
     * @return 实习岗位跟踪
     */
    @Override
    public TraineeJob selectTraineeJobByTrId(Long trId)
    {
        return traineeJobMapper.selectTraineeJobByTrId(trId);
    }

    /**
     * 查询实习岗位跟踪列表
     * 
     * @param traineeJob 实习岗位跟踪
     * @return 实习岗位跟踪
     */
    @Override
    public List<TraineeJob> selectTraineeJobList(TraineeJob traineeJob)
    {
        return traineeJobMapper.selectTraineeJobList(traineeJob);
    }

    /**
     * 新增实习岗位跟踪
     * 
     * @param traineeJob 实习岗位跟踪
     * @return 结果
     */
    @Override
    public int insertTraineeJob(TraineeJob traineeJob)
    {
        traineeJob.setCreateTime(DateUtils.getNowDate());
        return traineeJobMapper.insertTraineeJob(traineeJob);
    }

    /**
     * 修改实习岗位跟踪
     * 
     * @param traineeJob 实习岗位跟踪
     * @return 结果
     */
    @Override
    public int updateTraineeJob(TraineeJob traineeJob)
    {
        traineeJob.setUpdateTime(DateUtils.getNowDate());
        return traineeJobMapper.updateTraineeJob(traineeJob);
    }

    /**
     * 批量删除实习岗位跟踪
     * 
     * @param trIds 需要删除的实习岗位跟踪主键
     * @return 结果
     */
    @Override
    public int deleteTraineeJobByTrIds(Long[] trIds)
    {
        return traineeJobMapper.deleteTraineeJobByTrIds(trIds);
    }

    /**
     * 删除实习岗位跟踪信息
     * 
     * @param trId 实习岗位跟踪主键
     * @return 结果
     */
    @Override
    public int deleteTraineeJobByTrId(Long trId)
    {
        return traineeJobMapper.deleteTraineeJobByTrId(trId);
    }
}
